package com.rover022.flixelgame.utils
{
	import flash.display.DisplayObjectContainer;
	import flash.display.Sprite;
	import flash.utils.ByteArray;

	public class ObjectFactory
	{
		public function ObjectFactory()
		{
		}

		public static function makeEContainer(param0:DisplayObjectContainer, _x:Number = 0, _y:Number = 0):Sprite
		{
			var _sprite:Sprite = new Sprite();
			_sprite.mouseChildren = false;
			_sprite.mouseEnabled = false;
			_sprite.x = _x;
			_sprite.y = _y;
			param0.addChild(_sprite);
			return _sprite;
		}

		public static function clone(source:Object):Object
		{
			var r:ByteArray = new ByteArray();
			r.writeObject(source);
			r.position = 0;
			return (r.readObject());
		}
	}
}
